﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MainClient
{
    static class LoginUser
    {
        private static string username;
        private static string permission;
        private static string duty;
        private static DateTime LoginTime;

        public static void setLoginUser(string strUser, string strPerm, string strDuty)
        {
            username = strUser;
            permission = strPerm;
            duty = strDuty;
            LoginTime = DateTime.Now;
        }

        public static string getDutyStringByInt(int iDuty)
        {
            switch (iDuty)
            {
                case DataAccess.UserDAO.DUTY_WAITER :
                    return "服务员";
                case DataAccess.UserDAO.DUTY_CHEF :
                    return "厨师";
                case DataAccess.UserDAO.DUTY_MANAGER :
                    return "管理人员";
                default :
                    return "";
            }
        }

        public static string getCurrOper()
        {
            return username;
        }

        public static string getPerm()
        {
            return permission;
        }

        public static string getDuty()
        {
            return duty;
        }
    }
}
